<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserIntegral extends Model
{
    //积分申请
    protected $table = 'user_integral';

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function integral_plan()
    {
        return $this->belongsTo(IntegralPlan::class, 'integral_plan_id', 'id');
    }

    public function pay_type()
    {
        return $this->belongsTo(PayType::class, 'pay_type_id', 'id');
    }

    public function user_vip()
    {
        return $this->belongsTo(UserVip::class, 'user_id', 'user_id');
    }

}
